package com.gqj.meter.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gqj.common.annotation.Excel;
import com.gqj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.poi.ss.usermodel.IndexedColors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 电能表对象 md_meter
 *
 * @author lxq
 * @date lxq-02-10
 */
public class MdMeter extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty("电能表id")
    private Long meterId;

    /**
     * rfid编号/条形码
     */
    @ApiModelProperty("rfid编号/条形码")
    @Excel(name = "条形码", headerBackgroundColor = IndexedColors.RED1, width = 25)
    private String rfidNo;

    /**
     * 设备码
     */
    @ApiModelProperty(name = "设备码")
    @Excel(name = "设备码", width = 25)
    private String equipCode;

    /**
     * 设备名称
     */
    @ApiModelProperty(name = "设备名称")
    @Excel(name = "设备名称", width = 25)
    private String equipName;

    /**
     * 接线方式
     */
    @ApiModelProperty("接线方式")
    @Excel(name = "接线方式", dictType = "md_wiring_mode")
    private String wiringMode;

    /**
     * 资产编号
     */
    @ApiModelProperty("资产编号")
    @Excel(name = "资产编号", width = 25)
    private String meterNo;

    /**
     * 电压
     */
    @ApiModelProperty("电压")
    @Excel(name = "电压", dictType = "md_volt_code")
    private String voltCode;

    /**
     * 电流
     */
    @ApiModelProperty("电流")
    @Excel(name = "电流", dictType = "md_current_code")
    private String currentCode;

    /**
     * 有功等级
     */
    @ApiModelProperty("有功等级")
    @Excel(name = "有功等级", dictType = "md_ap_pre_level_code")
    private String apPreLevelCode;

    /**
     * 出厂编号
     */
    @ApiModelProperty("出厂编号")
    @Excel(name = "出厂编号", width = 25)
    private String madeNo;

    /**
     * 类别
     */
    @ApiModelProperty("类别")
    @Excel(name = "类别", dictType = "emi_meter_sort")
    private String sortCode;

    /**
     * 封印编号
     */
    @ApiModelProperty("封印编号")
    @Excel(name = "封印编号")
    private String sealNo;

    /**
     * 类型
     */
    @ApiModelProperty("类型")
    @Excel(name = "类型")
    private String typeCode;

    /**
     * 型号
     */
    @ApiModelProperty("型号")
    @Excel(name = "型号")
    private String modelCode;

    /**
     * 表地址
     */
    @ApiModelProperty("表地址")
    @Excel(name = "表地址")
    private String meterAddress;

    /**
     * 无功等级
     */
    @ApiModelProperty("无功等级")
    @Excel(name = "无功等级")
    private String rpPreLevelCode;

    /**
     * 是否双向计量01：是、02：否
     */
    @ApiModelProperty("是否双向计量")
    @Excel(name = "是否双向计量")
    private String bothWayCalc;

    /**
     * 电能表位数示数位数，采用n.d形式。n为整数部分位数，d为小数部分位数。
     */
    @ApiModelProperty("电能表位数示数位数")
    @Excel(name = "电能表位数")
    private BigDecimal meterDigits;

    /**
     * 当前状态
     */
    @ApiModelProperty("当前状态")
    @Excel(name = "当前状态",dictType = "cur_status_code")
    private String curStatusCode;

    /**
     * 所在单位
     */
    @ApiModelProperty("所在单位")
    @Excel(name = "所在单位", width = 40)
    private String belongDept;

    /**
     * 产权单位编码
     */
    @ApiModelProperty("产权单位编码")
    @Excel(name = "产权单位", width = 40)
    private String prOrg;

    /**
     * 地区编码
     */
    @ApiModelProperty("地区编码")
    @Excel(name = "地区名称", width = 40)
    private String areaCode;

    /**
     * 产权
     */
    @ApiModelProperty("产权")
    @Excel(name = "产权")
    private String prCode;

    /**
     * 制造单位/生产厂家
     */
    @ApiModelProperty("制造单位/生产厂家")
    @Excel(name = "制造单位", width = 30)
    private String manufacturer;

    /**
     * 到货批次号/生产批次
     */
    @ApiModelProperty("到货批次号/生产批次")
    @Excel(name = "到货批次")
    private String lotNo;

    /**
     * 配送日期
     */
    @ApiModelProperty("配送日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "配送日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date deliveryDate;

    /**
     * 建档日期
     */
    @ApiModelProperty("建档日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "建档日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date createdDate;

    /**
     * 检定入库日期
     */
    @ApiModelProperty("检定入库日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检定入库日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date inspectInDate;

    /**
     * 安装日期
     */
    @ApiModelProperty("安装日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "安装日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date instDate;

    /**
     * 拆表日期
     */
    @ApiModelProperty("拆表日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "拆表日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date rmvDate;

    /**
     * 报废日期
     */
    @ApiModelProperty("报废日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报废日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date descardDate;

    /**
     * 通讯规约
     */
    @ApiModelProperty("通讯规约")
    @Excel(name = "通讯规约")
    private String commProtCode;

    /**
     * 波特率
     */
    @ApiModelProperty("波特率")
    @Excel(name = "波特率")
    private String baudrateCode;

    /**
     * 是否阻逆01：是、02：否
     */
    @ApiModelProperty("是否阻逆")
    @Excel(name = "是否阻逆")
    private String ccPreventFlag;

    /**
     * 计度器方式：反向止逆，双向正走、正反走
     */
    @ApiModelProperty("计度器方式")
    @Excel(name = "计度器方式")
    private String registerMode;

    /**
     * 建档类型01：转接、02：正常、03：维护
     */
    @ApiModelProperty("建档类型")
    @Excel(name = "建档类型")
    private String docTypeCode;

    /**
     * 电能表技术规范版本
     */
    @ApiModelProperty("电能表技术规范版本")
    @Excel(name = "电能表技术规范版本")
    private String versionNo;

    /**
     * 库房编号
     */
    @ApiModelProperty("库房编号")
    private String whNo;

    /**
     * 库房名称
     */
    @ApiModelProperty("库房名称")
    private String whName;

    /**
     * 库区编号
     */
    @ApiModelProperty("库区编号")
    private String whAreaNo;

    /**
     * 库区名称
     */
    @ApiModelProperty("库区名称")
    private String whAreaname;
    /**
     * 存放区编号
     */
    @ApiModelProperty("存放区编号")
    private String storeAreaNo;

    /**
     * 存放区名称
     */
    @ApiModelProperty("存放区名称")
    private String storeAreaName;

    /**
     * 储位编号
     */
    @ApiModelProperty("储位编号")
    private String storeLocNo;

    /**
     * 储位名称
     */
    @ApiModelProperty("储位名称")
    private String storeLocName;

    /**
     * 库房标识
     */
    @ApiModelProperty("库房标识")
    private Long whId;

    /**
     * 库区标识
     */
    @ApiModelProperty("库区标识")
    private Long whAreaId;

    /**
     * 存放区标识
     */
    @ApiModelProperty("存放区标识")
    private Long storeAreaId;

    /**
     * 储位标识
     */
    @ApiModelProperty("储位标识")
    private Long storeLocId;

    /**
     * 电价码
     */
    @ApiModelProperty("电价码")
    @Excel(name = "电价码")
    private String tariffCode;

    /**
     * 电价名称
     */
    @ApiModelProperty("电价名称")
    @Excel(name = "电价名称")
    private String tariffName;

    /**
     * 电价金额
     */
    @ApiModelProperty("电价金额")
    @Excel(name = "电价金额")
    private String tariffAmount;

    /**
     * 电价版本号
     */
    @ApiModelProperty("电价版本号")
    @Excel(name = "电价版本号")
    private String tariffVersionNo;

    /**
     * 预置电费
     */
    @ApiModelProperty("预置电费")
    @Excel(name = "预置电费")
    private String presetCharge;

    /**
     * 订单类型
     */
    @ApiModelProperty("订单类型")
    @Excel(name = "订单类型")
    private String orderType;

    /**
     * 芯片厂商
     */
    @ApiModelProperty("芯片厂商")
    @Excel(name = "芯片厂商", width = 30)
    private String chipManufacturer;

    /**
     * 分拣日期
     */
    @ApiModelProperty("分拣日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "分拣日期", width = 30, dateFormat = "yyyy/MM/dd")
    private Date sortingDate;

    /**
     * 资金来源
     */
    @ApiModelProperty("资金来源")
    @Excel(name = "资金来源")
    private String capitalSource;

    /**
     * 盘点时间
     */
    @ApiModelProperty("盘点时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "盘点时间", width = 30, dateFormat = "yyyy/MM/dd")
    private Date checkDate;

    /**
     * 绑定模块条码
     */
    @ApiModelProperty("绑定模块条码")
    @Excel(name = "绑定模块条码")
    private String moduleCode;

    /**
     * 电表费率时段
     */
    @ApiModelProperty("电表费率时段")
    @Excel(name = "电表费率时段")
    private String ratePeriod;

    /**
     * 电能表主键集合
     */
    @ApiModelProperty("电能表主键集合")
    private Long[] meterIds;

    @ApiModelProperty("业务状态")
    @Excel(name = "业务状态", dictType = "service_status", type = Excel.Type.IMPORT)
    private String serviceStatus;

    /**
     * 电能表主键集合
     */
    @ApiModelProperty("业务状态集合")
    private String[] serviceStatuss;

    /**
     * 条形码集合
     */
    @ApiModelProperty("条形码集合")
    private String[] rfidNoStr;

    /**
     * 设备标识
     */
    private Long equipId;

    public String getEquipCode() {
        return equipCode;
    }

    public void setEquipCode(String equipCode) {
        this.equipCode = equipCode;
    }

    public String getEquipName() {
        return equipName;
    }

    public void setEquipName(String equipName) {
        this.equipName = equipName;
    }

    public Long getEquipId() {
        return equipId;
    }

    public void setEquipId(Long equipId) {
        this.equipId = equipId;
    }

    public String[] getRfidNoStr() {
        return rfidNoStr;
    }

    public void setRfidNoStr(String[] rfidNoStr) {
        this.rfidNoStr = rfidNoStr;
    }

    public String[] getServiceStatuss() {
        return serviceStatuss;
    }

    public void setServiceStatuss(String[] serviceStatuss) {
        this.serviceStatuss = serviceStatuss;
    }

    public String getServiceStatus() {
        return serviceStatus;
    }

    public void setServiceStatus(String serviceStatus) {
        this.serviceStatus = serviceStatus;
    }

    public Long[] getMeterIds() {
        return meterIds;
    }

    public void setMeterIds(Long[] meterIds) {
        this.meterIds = meterIds;
    }

    public void setMeterId(Long meterId) {
        this.meterId = meterId;
    }

    public Long getMeterId() {
        return meterId;
    }

    public void setMeterNo(String meterNo) {
        this.meterNo = meterNo;
    }

    public String getMeterNo() {
        return meterNo;
    }

    public void setRfidNo(String rfidNo) {
        this.rfidNo = rfidNo;
    }

    @NotBlank(message = "条形码不能为空")
    @Size(min = 0, max = 50, message = "条形码长度不能超过50个字符")
    public String getRfidNo() {
        return rfidNo;
    }

    public void setSealNo(String sealNo) {
        this.sealNo = sealNo;
    }

    public String getSealNo() {
        return sealNo;
    }

    public void setMadeNo(String madeNo) {
        this.madeNo = madeNo;
    }

    public String getMadeNo() {
        return madeNo;
    }

    public void setSortCode(String sortCode) {
        this.sortCode = sortCode;
    }

    public String getSortCode() {
        return sortCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setMeterAddress(String meterAddress) {
        this.meterAddress = meterAddress;
    }

    public String getMeterAddress() {
        return meterAddress;
    }

    public void setVoltCode(String voltCode) {
        this.voltCode = voltCode;
    }

    public String getVoltCode() {
        return voltCode;
    }

    public void setCurrentCode(String currentCode) {
        this.currentCode = currentCode;
    }

    public String getCurrentCode() {
        return currentCode;
    }

    public void setApPreLevelCode(String apPreLevelCode) {
        this.apPreLevelCode = apPreLevelCode;
    }

    public String getApPreLevelCode() {
        return apPreLevelCode;
    }

    public void setRpPreLevelCode(String rpPreLevelCode) {
        this.rpPreLevelCode = rpPreLevelCode;
    }

    public String getRpPreLevelCode() {
        return rpPreLevelCode;
    }

    public void setBothWayCalc(String bothWayCalc) {
        this.bothWayCalc = bothWayCalc;
    }

    public String getBothWayCalc() {
        return bothWayCalc;
    }

    public void setWiringMode(String wiringMode) {
        this.wiringMode = wiringMode;
    }

    public String getWiringMode() {
        return wiringMode;
    }

    public void setMeterDigits(BigDecimal meterDigits) {
        this.meterDigits = meterDigits;
    }

    public BigDecimal getMeterDigits() {
        return meterDigits;
    }

    public void setCurStatusCode(String curStatusCode) {
        this.curStatusCode = curStatusCode;
    }

    public String getCurStatusCode() {
        return curStatusCode;
    }

    public void setBelongDept(String belongDept) {
        this.belongDept = belongDept;
    }

    public String getBelongDept() {
        return belongDept;
    }

    public void setPrOrg(String prOrg) {
        this.prOrg = prOrg;
    }

    public String getPrOrg() {
        return prOrg;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setPrCode(String prCode) {
        this.prCode = prCode;
    }

    public String getPrCode() {
        return prCode;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setLotNo(String lotNo) {
        this.lotNo = lotNo;
    }

    public String getLotNo() {
        return lotNo;
    }

    public void setDeliveryDate(Date deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public Date getDeliveryDate() {
        return deliveryDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setInspectInDate(Date inspectInDate) {
        this.inspectInDate = inspectInDate;
    }

    public Date getInspectInDate() {
        return inspectInDate;
    }

    public void setInstDate(Date instDate) {
        this.instDate = instDate;
    }

    public Date getInstDate() {
        return instDate;
    }

    public void setRmvDate(Date rmvDate) {
        this.rmvDate = rmvDate;
    }

    public Date getRmvDate() {
        return rmvDate;
    }

    public void setDescardDate(Date descardDate) {
        this.descardDate = descardDate;
    }

    public Date getDescardDate() {
        return descardDate;
    }

    public void setCommProtCode(String commProtCode) {
        this.commProtCode = commProtCode;
    }

    public String getCommProtCode() {
        return commProtCode;
    }

    public void setBaudrateCode(String baudrateCode) {
        this.baudrateCode = baudrateCode;
    }

    public String getBaudrateCode() {
        return baudrateCode;
    }

    public void setCcPreventFlag(String ccPreventFlag) {
        this.ccPreventFlag = ccPreventFlag;
    }

    public String getCcPreventFlag() {
        return ccPreventFlag;
    }

    public void setRegisterMode(String registerMode) {
        this.registerMode = registerMode;
    }

    public String getRegisterMode() {
        return registerMode;
    }

    public void setDocTypeCode(String docTypeCode) {
        this.docTypeCode = docTypeCode;
    }

    public String getDocTypeCode() {
        return docTypeCode;
    }

    public void setVersionNo(String versionNo) {
        this.versionNo = versionNo;
    }

    public String getVersionNo() {
        return versionNo;
    }

    public void setWhId(Long whId) {
        this.whId = whId;
    }

    public Long getWhId() {
        return whId;
    }

    public void setWhAreaId(Long whAreaId) {
        this.whAreaId = whAreaId;
    }

    public Long getWhAreaId() {
        return whAreaId;
    }

    public void setStoreAreaId(Long storeAreaId) {
        this.storeAreaId = storeAreaId;
    }

    public Long getStoreAreaId() {
        return storeAreaId;
    }

    public void setStoreLocId(Long storeLocId) {
        this.storeLocId = storeLocId;
    }

    public Long getStoreLocId() {
        return storeLocId;
    }

    public void setTariffName(String tariffName) {
        this.tariffName = tariffName;
    }

    public String getTariffName() {
        return tariffName;
    }

    public void setTariffAmount(String tariffAmount) {
        this.tariffAmount = tariffAmount;
    }

    public String getTariffAmount() {
        return tariffAmount;
    }

    public void setTariffVersionNo(String tariffVersionNo) {
        this.tariffVersionNo = tariffVersionNo;
    }

    public String getTariffVersionNo() {
        return tariffVersionNo;
    }

    public void setPresetCharge(String presetCharge) {
        this.presetCharge = presetCharge;
    }

    public String getPresetCharge() {
        return presetCharge;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setChipManufacturer(String chipManufacturer) {
        this.chipManufacturer = chipManufacturer;
    }

    public String getChipManufacturer() {
        return chipManufacturer;
    }

    public void setSortingDate(Date sortingDate) {
        this.sortingDate = sortingDate;
    }

    public Date getSortingDate() {
        return sortingDate;
    }

    public void setCapitalSource(String capitalSource) {
        this.capitalSource = capitalSource;
    }

    public String getCapitalSource() {
        return capitalSource;
    }

    public void setCheckDate(Date checkDate) {
        this.checkDate = checkDate;
    }

    public Date getCheckDate() {
        return checkDate;
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    public String getModuleCode() {
        return moduleCode;
    }

    public void setRatePeriod(String ratePeriod) {
        this.ratePeriod = ratePeriod;
    }

    public String getRatePeriod() {
        return ratePeriod;
    }

    public String getTariffCode() {
        return tariffCode;
    }

    public void setTariffCode(String tariffCode) {
        this.tariffCode = tariffCode;
    }

    public String getWhNo() {
        return whNo;
    }

    public void setWhNo(String whNo) {
        this.whNo = whNo;
    }

    public String getWhName() {
        return whName;
    }

    public void setWhName(String whName) {
        this.whName = whName;
    }

    public String getWhAreaNo() {
        return whAreaNo;
    }

    public void setWhAreaNo(String whAreaNo) {
        this.whAreaNo = whAreaNo;
    }

    public String getWhAreaname() {
        return whAreaname;
    }

    public void setWhAreaname(String whAreaname) {
        this.whAreaname = whAreaname;
    }

    public String getStoreAreaNo() {
        return storeAreaNo;
    }

    public void setStoreAreaNo(String storeAreaNo) {
        this.storeAreaNo = storeAreaNo;
    }

    public String getStoreAreaName() {
        return storeAreaName;
    }

    public void setStoreAreaName(String storeAreaName) {
        this.storeAreaName = storeAreaName;
    }

    public String getStoreLocNo() {
        return storeLocNo;
    }

    public void setStoreLocNo(String storeLocNo) {
        this.storeLocNo = storeLocNo;
    }

    public String getStoreLocName() {
        return storeLocName;
    }

    public void setStoreLocName(String storeLocName) {
        this.storeLocName = storeLocName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("meterId", getMeterId())
                .append("meterNo", getMeterNo())
                .append("rfidNo", getRfidNo())
                .append("sealNo", getSealNo())
                .append("madeNo", getMadeNo())
                .append("sortCode", getSortCode())
                .append("typeCode", getTypeCode())
                .append("modelCode", getModelCode())
                .append("meterAddress", getMeterAddress())
                .append("voltCode", getVoltCode())
                .append("currentCode", getCurrentCode())
                .append("apPreLevelCode", getApPreLevelCode())
                .append("rpPreLevelCode", getRpPreLevelCode())
                .append("bothWayCalc", getBothWayCalc())
                .append("wiringMode", getWiringMode())
                .append("meterDigits", getMeterDigits())
                .append("curStatusCode", getCurStatusCode())
                .append("belongDept", getBelongDept())
                .append("prOrg", getPrOrg())
                .append("areaCode", getAreaCode())
                .append("prCode", getPrCode())
                .append("manufacturer", getManufacturer())
                .append("lotNo", getLotNo())
                .append("deliveryDate", getDeliveryDate())
                .append("createdDate", getCreatedDate())
                .append("inspectInDate", getInspectInDate())
                .append("instDate", getInstDate())
                .append("rmvDate", getRmvDate())
                .append("descardDate", getDescardDate())
                .append("commProtCode", getCommProtCode())
                .append("baudrateCode", getBaudrateCode())
                .append("ccPreventFlag", getCcPreventFlag())
                .append("registerMode", getRegisterMode())
                .append("docTypeCode", getDocTypeCode())
                .append("versionNo", getVersionNo())
                .append("whId", getWhId())
                .append("whAreaId", getWhAreaId())
                .append("storeAreaId", getStoreAreaId())
                .append("storeLocId", getStoreLocId())
                .append("tariffCode", getTariffCode())
                .append("tariffName", getTariffName())
                .append("tariffAmount", getTariffAmount())
                .append("tariffVersionNo", getTariffVersionNo())
                .append("presetCharge", getPresetCharge())
                .append("orderType", getOrderType())
                .append("chipManufacturer", getChipManufacturer())
                .append("sortingDate", getSortingDate())
                .append("capitalSource", getCapitalSource())
                .append("checkDate", getCheckDate())
                .append("moduleCode", getModuleCode())
                .append("ratePeriod", getRatePeriod())
                .toString();
    }
}
